﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TicketManagement.aspx.cs" Inherits="WebApp.TicketManagement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="scriptCssContent" runat="server">
    <link href="css/tables.css" type="text/css" rel="Stylesheet" />
    <script language="javascript" type="text/javascript" src="js/common.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="titlePlaceHolder" runat="server">
    <asp:literal id="pageTitle" runat="server"></asp:literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="menuPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <asp:label id="messageLabel" runat="server" cssclass="ErrorMessage"></asp:label><%= messageLabel.Visible == true ? "<br /><br />" : "" %>
    <one:repeater id="repeaterTickets" runat="server">
        <headertemplate>
            <table class="Grid">
                <thead>
                    <tr>
                        <th class="Check"><input type="checkbox" id="checkAll" onclick="choiceBehavior.doCheckAll(this.checked)" /></th>
                        <th><a href="<%= GetOrderByLink(AdminOrderBy.Id.ToString()) %>"><%= Resources.Strings.Id%></a><%= GetOrderDirectionIndicator(AdminOrderBy.Id.ToString()) %></th>
                        <th><a href="<%= GetOrderByLink(AdminOrderBy.Username.ToString()) %>"><%= Resources.Strings.Username%></a><%= GetOrderDirectionIndicator(AdminOrderBy.Username.ToString())%></th>
                        <th><a href="<%= GetOrderByLink(AdminOrderBy.Email.ToString()) %>"><%= Resources.Strings.Email%></a><%= GetOrderDirectionIndicator(AdminOrderBy.Email.ToString())%></th>
                        <th>&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
        </headertemplate>
        <itemtemplate>
                    <tr>
                        <td class="Check"><input type="checkbox" id="selectedCheckBox<%# Container.ItemIndex %>" name="selectedItems" value="<%# Eval(AdminOrderBy.Id.ToString()) %>" onclick="choiceBehavior.checkChanged(this.checked)"/></td>
                        <td class="Number"><%# One.Web.HttpUtility.HtmlEncode(Eval(AdminOrderBy.Id.ToString()))%></td>
                        <td><%# One.Web.HttpUtility.HtmlEncode(Eval(AdminOrderBy.Username.ToString()))%></td>
                        <td><%# One.Web.HttpUtility.HtmlEncode(Eval(AdminOrderBy.Email.ToString()))%></td>
						<td>
						    <a href="AdminEdit.aspx?AdminId=<%# Eval(AdminOrderBy.Id.ToString()) %>"><%= Resources.Strings.Edit %></a>
						</td>
                    </tr>
        </itemtemplate>
        <nonetemplate>
                    <tr>
                        <td colspan="7"><%= Resources.Strings.NoTicketItem %></td>
                    </tr>
        </nonetemplate>
        <footertemplate>
                </tbody>
            </table>
        </footertemplate>
    </one:repeater>
    <div class="Pagination">
        <one:pager runat="server" id="pager" parameter="page"></one:pager>
    </div>
    <div class="ActionRow">     
        <input type="button" value="<%= Resources.Strings.Detail %>" onclick="window.location = 'TicketDetail.aspx';" />
    </div>
    <script language="javascript" type="text/javascript">
        choiceBehavior.totalItems = <%= listAdmins == null ? 0 : listAdmins.Count %>;
        choiceBehavior.btnActions = new Array();
        choiceBehavior.checkAll = getControl('checkAll');
        choiceBehavior.init();
    </script>    
</asp:Content>
